To reduce electricity consumption, some portable terminals, such as mobile telephones or smartphones, have a function of switching a state of the portable terminals from a state in which a large amount of electric power is consumed, to another state, in which a small amount of electric power is consumed. For example, the state in which a small amount of electric power is consumed refers to a state in which no operation is received from a user. JP2011-133976 discloses a technique for detecting an area of a region, in which no light is detected, on a display screen based on a result of detection by an optical sensor that is disposed at each pixel of the display surface serving as an operation surface, and for setting a key input to invalid (namely, switching to a state in which no operation can be received) when an area greater than a predetermined area is detected.
In the technique disclosed in JP2011-133976, even if a portable terminal is not stored in a storage space, it is determined that the portable terminal is stored in the storage space to transition a state of the portable terminal; for example, when the portable terminal is used in a building, in which lights are turned off, or is used on a dark street at night, and when no light is detected on an area of a region of a display screen that exceeds a predetermined area, a similar determination is made to that in a case where the portable terminal is stored in a storage space. It can thus be said that the technique disclosed in JP2011-133976 has low accuracy in determining whether the portable terminal is stored.